sysroot: Remove now-spurious assertion change from soft reboot changes
authorColin Walters <walters@verbum.org>
Mon, 30 Jun 2025 19:36:32 +0000 (15:36 -0400)
committerColin Walters <walters@verbum.org>
Mon, 30 Jun 2025 19:36:32 +0000 (15:36 -0400)
We fixed the bug that caused soft reboot to trip the assertion
here, so revert back to a hard check.

src/libostree/ostree-sysroot.c

index f9955ce23375db3d3bd4507ddfd4a1cfa3648c07..4cf388bc44912f7add3a341a9abe9beef855707c 100644 (file)
@@ -1140,18 +1140,7 @@ _ostree_sysroot_reload_staged (OstreeSysroot *self, GError **error)
   if (!self->root_is_ostree_booted)
     return TRUE; /* Note early return */
 
-  /* In normal cases, we should have a booted deployment. However, during
-   * soft-reboot scenarios, the current deployment may not correspond to
-   * any bootloader entry, so booted_deployment could be NULL. */
-  if (!self->booted_deployment)
-    {
-      /* Check if we're in a soft-reboot scenario */
-      if (!(g_file_test ("/run/nextroot", G_FILE_TEST_IS_DIR)
-            && g_file_test ("/run/nextroot/sysroot", G_FILE_TEST_IS_DIR)))
-        {
-          g_assert (self->booted_deployment);
-        }
-    }
+  g_assert (self->booted_deployment);
 
   g_clear_object (&self->staged_deployment);
   g_clear_pointer (&self->staged_deployment_data, g_variant_unref);